# Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
# Contributor: nofxx <x@nofxx.com>
pkgname=airpwn
pkgver=1.4
pkgrel=1
pkgdesc="Airpwn is a tool for generic packet injection on an 802.11 network."
arch=('i686' 'x86_64')
url="http://airpwn.sourceforge.net"
license=('GPL')
depends=('pcre' 'libpcap' 'openssl' 'lorcon' 'wireless_tools' 'libnet' 'python')
source=(http://downloads.sourceforge.net/airpwn/$pkgname-$pkgver.tgz)
md5sums=('c5538f5eadc2afa0bf3e873c4bfa2513')
build() {
  cd "${srcdir}"/$pkgname-$pkgver
	./configure --prefix=/usr --mandir=/usr/share/man
  # really configure should be fixed to detect python 2.6, but I'm too dumb for that :(
  sed -i 's/python2.4/python2.6/g' conf.h || return 1
  sed -i 's|-lssl -lorcon -lpthread -lpcre -lpcap -lnet|-lssl -lorcon -lpthread -lpcre -lpcap -lnet -lpython2.6|g' Makefile
	make || return 1
	make DESTDIR="${pkgdir}" install || return 1
}
